Many applications for smartphones use location information. Many smartphones include a global navigation satellite system (GNSS) such as the global positioning system (GPS). In an indoor environment, GNSS solutions do not always function accurately due to heavy attenuation of the satellite signals. Alternatives are available to GNSS such as sensor-based navigation and WiFi-based positioning.
Sensor-based solutions may include a micro-electrical-mechanical system (MEMS) sensor such as an accelerometer, an electronic compass (e-compass), gyroscope, etc. An issue in sensor-based solutions is sensor calibration. Sensors provide only user-displacement information, not absolute location. Thus, an initial position is required. The sensor can be used to determine position from that point forward as the smartphone becomes mobile. Measurement errors, however, eventually render the position determined from a sensor inaccurate.
Magnetometers are commonly included in consumer electronic devices to enable navigation or other applications. The magnetometer's measurements are only useful when they are calibrated. Typically, when the user wants to use an application that requires the magnetometer, the device instructs the user to perform a calibration maneuver. This can be confusing and tedious, which devalues the use of the magnetometer.
The prior art developed an error model for the magnetometer and describes a least-squares estimator for the calibration parameters. The least-squares estimator requires a reasonably accurate initial guess that is obtained via an algorithm. Another valuable contribution from the prior art is that a covariance of the estimate is provided. A more generalized parameter estimator in a concise form has been developed as was a similar magnetometer error model and an even more generalized calibration parameter estimator.